import React from "react"

export default class SubCom  extends React.Component{

    change = () => {
        this.props.list.push(1)

        console.log(this.props)
    }
    render() {
        // console.log(Object.getOwnPropertyDescriptor(this.props,'age'))
        // this.props.age = 100
        console.log(this.props)
        return (
        <div>
            子组件
            <button onClick={this.change}>修改props</button>
            {this.props.age}, {this.props.money}, {this.props.list}
        </div>)
    }
}